#ifndef _H_DEF_COMMDEF_H
#define _H_DEF_COMMDEF_H


#define dflpszPipename  L"\\\\.\\pipe\\msgpipe_pid1234567890"
#define dflpszPipemutx	L"obj_serverisrun_mutex"
#define MAX_THREAD		2


#define PIPE_MAXSIZE	1024
 
#define	BUFSIZE			PIPE_MAXSIZE


#define	INVALID_VALUE -1




#define SEND_REQUEST		0x00000004
#define RESP_REQUEST_OK		SEND_REQUEST + 0

#define OPEN_REQUEST		0x01
#define	OPEN_OK				OPEN_REQUEST

#define CLOSE_REQUEST		0x02
#define CLOSE_OK			CLOSE_REQUEST


typedef struct _ST_PipeMutileThreadPool
{
	DWORD	dwindex;
	BOOL	bInUse;
	HANDLE	hThread;
	DWORD	dwthreadid;
	HANDLE	hpipe;
	HANDLE	hEvent;
	
	DWORD	dwThreadError;

}ST_pipe_pool,*PST_pipe_pool;



typedef struct _ST_AUTH_TOKEN
{
	BYTE	bContext[32];
}ST_AUTH_TOKEN,*PST_AUTH_TOKEN;



typedef struct _ST_comm_header
{			
	DWORD			dwCMDorSTAT;
	DWORD			dwBuffLength;
	ST_AUTH_TOKEN	st_token;	
	
}ST_comm_header,*PST_comm_header;



#endif	//_H_DEF_COMMDEF_H